package com.huicoo.forestmanager.ui.patrol.PatrolRecordDetailsActivity;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

public class PatrolRecordDetailsAdapter extends FragmentPagerAdapter {
    ArrayList<Fragment> mFragments=new ArrayList<>();

    public PatrolRecordDetailsAdapter(FragmentManager fm , Context context) {
        super(fm);
    }

    /**
     * 添加一页
     * @param fragment
     */
    public void addFragmentPager(Fragment fragment){//给外界提供添加方法
        mFragments.add(fragment);
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return mFragments.size();
    }

    @Override//设置tablaoyt的标题
    public CharSequence getPageTitle(int position) {
        return "";
    }

}